<template>
  <keep-alive>
    <div class="content">
      <nav-title title="员工信息采集" :routerLink = "routerLink"/>
      <folding title="基本信息" :is-add="false" @feedback="setIsShowType">
        <div class="normal-info" @click="toBasic('first')">
          <div class="detailed-info-box">
            <div class="label">姓</div>
            <div class="label-value">
              {{ bsinfo.lastName }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">名</div>
            <div class="label-value">
              {{ bsinfo.firstName }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">姓名拼音</div>
            <div class="label-value">
              {{ bsinfo.nameAc }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">曾用名</div>
            <div class="label-value">
              {{ bsinfo.rsUsedName }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">性别</div>
            <div class="label-value">
              {{ bsinfo.sexValue }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">国籍</div>
            <div class="label-value">
              {{ bsinfo.countryValue }}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">出生日期</div>
            <div class="label-value">
              {{ bsinfo.birthdate }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">民族</div>
            <div class="label-value">
              {{ bsinfo.ethnicGrpCdValue }}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">籍贯</div>
            <div class="label-value">
              {{ bsinfo.nativePlaceChn }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">最高学历</div>
            <div class="label-value">
              {{ bsinfo.highestEducLvlValue }}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">毕业院校</div>
            <div class="label-value">
              {{ bsinfo.cSchool }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">专业</div>
            <div class="label-value">
              {{ bsinfo.cMajor }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">参加工作日期</div>
            <div class="label-value">
              {{ bsinfo.startDtChn }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">入本公司时间</div>
            <div class="label-value">
              {{ bsinfo.rsWklifBgnDt }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">现在职称</div>
            <div class="label-value">
              {{ bsinfo.cPosition }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">政治面貌</div>
            <div class="label-value">
              {{ bsinfo.politicalStaChnValue }}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">入党(团)日期</div>
            <div class="label-value">
              {{ bsinfo.cDate }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">有无驾照</div>
            <div class="label-value" v-if="bsinfo.cYesNo == 'Y'">
              有
            </div>
            <div class="label-value" v-if="bsinfo.cYesNo == 'N'">
              无
            </div>
            <div class="label-value" v-if="bsinfo.cYesNo != 'N' && bsinfo.cYesNo != 'Y'">
              
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">身高(CM)</div>
            <div class="label-value">
              {{ bsinfo.rsPersHeight }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">体重(KG)</div>
            <div class="label-value">
              {{ bsinfo.rsPersWeight }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">血型</div>
            <div class="label-value">
              {{ bsinfo.rsBloodTypeValue }}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">健康状况</div>
            <div class="label-value">
              {{ bsinfo.rsHealthStatusValue}}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">婚姻状况</div>
            <div class="label-value">
              {{ bsinfo.marStatusValue}}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">生育状况</div>
            <div class="label-value">
              {{ bsinfo.cBearValue}}
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">证件类型</div>
            <div class="label-value">
              {{ bsinfo.nationalIdTypeValue }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">证件号码</div>
            <div class="label-value">
              {{ bsinfo.nationalId }}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">户籍地址</div>
            <div class="label-value">
              {{ bsinfo.addresslong1}}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">家庭详细地址</div>
            <div class="label-value">
              {{ bsinfo.addresslong3}}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">现在居住地址</div>
            <div class="label-value">
              {{ bsinfo.addresslong2}}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">指定送达地址</div>
            <div class="label-value">
              {{ bsinfo.cSendTypeValue}}
              <div>
                <br>
                {{ bsinfo.cAddress}}
              </div>
            </div>
            <div class="icon"><img src="./image/u252.png" alt=""></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">住宅电话</div>
            <div class="label-value">
              {{ bsinfo.phone1}}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">手机号码</div>
            <div class="label-value">
              {{ bsinfo.phone}}
            </div>
            <div class="icon"></div>
          </div>
          <div class="detailed-info-box">
            <div class="label">Email</div>
            <div class="label-value">
              {{ bsinfo.emailAddr}}
            </div>
            <div class="icon"></div>
          </div>
        </div>
      </folding>

      <div class="matters">
        <folding title="入公司前工作经历" @feedback="setIsShowType" where-is="theCompanyBefore">
          <div class="detailed">
            <!--点点代码块-->
            <div class="tip-time" v-for="(item, index) in expwVal">
              <div class="text-box" @click="toWorkExp(item)">
                <img class="star" v-if="index%2 === 0" src="./image/star-green.png" alt="">
                <img class="star" v-else src="./image/star-blue.png" alt="">
                <div class="time-interval">
                  {{item.startDt}} - {{item.endDt}}
                </div>
                <div>
                  <span class="important"></span>{{item.cCompany}}
                </div>
                <div>{{item.cPosition}}</div>
              </div>
              <div class="icon">
                <img src="./image/u252.png" alt="">
              </div>
            </div>
            <br>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="教育经历" @feedback="setIsShowType" where-is="education">
          <div class="detailed">
            <!--点点代码块-->
            <div class="tip-time" v-for="(item, index) in eduif">
              <div class="text-box" @click="toEdu(item)">
                <img class="star" v-if="index%2 === 0" src="./image/star-green.png" alt="">
                <img class="star" v-else src="./image/star-blue.png" alt="">
                <div class="time-interval">
                  {{item.startDt}} - {{item.endDt}}
                </div>
                <div>
                  {{item.cSchool}}
                </div>
                <div>{{item.cMajor}}</div>
                <div>{{item.cEducitonValue}} | {{item.cDegreeValue}}</div>
              </div>
              <div class="icon">
                <img src="./image/u252.png" alt="">
              </div>
            </div>
            <br>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="培训经历" @feedback="setIsShowType" where-is="training">
          <div class="detailed">
            <!--点点代码块-->
            <div class="tip-time" v-for="(item, index) in traVal">
              <div class="text-box" @click="totrain(item)">
                <img class="star" v-if="index%2 === 0" src="./image/star-green.png" alt="">
                <img class="star" v-else src="./image/star-blue.png" alt="">
                <div class="time-interval">
                  {{item.startDt}} - {{item.endDt}}
                </div>
                <div>
                  <span class="important"></span>{{item.cCompany}}
                </div>
                <div>{{item.cDescr}}</div>
              </div>
              <div class="icon">
                <img src="./image/u252.png" alt="">
              </div>
            </div>
            <br>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="资格证书" @feedback="setIsShowType" where-is="qualification">
          <div class="detailed">
            <!--点点代码块-->
            <div class="tip-time" v-for="(item, index) in zgzVal">
              <div class="text-box" @click="toquality(item)">
                <img class="star" v-if="index%2 === 0" src="./image/star-green.png" alt="">
                <img class="star" v-else src="./image/star-blue.png" alt="">
                <div class="time-interval">
                  {{item.cDate}}<span class="important" v-if="item.cDate1 != undefined"> [ {{item.cDate1}}到期 ]</span>
                </div>
                <div>
                  {{item.cName}} {{item.cLevel}}
                </div>
                <div>签发单位：<span class="important"></span>{{item.cCompany}}</div>
              </div>

              <div class="icon">
                <img src="./image/u252.png" alt="">
              </div>
            </div>
            <br>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="语言能力" @feedback="setIsShowType" where-is="language">
          <div class="ability" v-for="item in lanVal">
            <div class="content" @click="toLang(item)">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label">语言</div>
                  <div class="label-value">
                    {{item.rsLangCdValue}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">证书名称</div>
                  <div class="label-value">
                    {{item.cDescr}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">掌握程度</div>
                  <div class="label-value">
                    {{item.cLangLvValue}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
            <div class="icon">
              <img src="./image/u252.png" alt="">
            </div>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="计算机能力" @feedback="setIsShowType" where-is="computer">
          <div class="ability" v-for="item in pcVal">
            <div class="content" @click="toComputer(item)">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label">技能名称</div>
                  <div class="label-value">
                    {{item.cName}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">证书名称</div>
                  <div class="label-value">
                    {{item.cDescr}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">掌握程度</div>
                  <div class="label-value">
                    {{item.cTechLvValue}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
            <div class="icon">
              <img src="./image/u252.png" alt="">
            </div>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="奖惩情况" @feedback="setIsShowType" where-is="rewardsAndPunishments">
          <div class="detailed">
            <!--点点代码块-->
            <div class="tip-time" v-for="(item, index) in jcVal">
              <div class="text-box" @click="toReward(item)">
                <img class="star" v-if="index%2 === 0" src="./image/star-green.png" alt="">
                <img class="star" v-else src="./image/star-blue.png" alt="">
                <div class="time-interval">
                  {{item.cDate}} <span style="margin-left: 70px;color: black">{{item.rsJclbTypeValue}}</span>
                </div>
                <div>
                  {{item.cName}}
                </div>
                <div>颁发机构：{{item.cCompany}}</div>
              </div>
              <div class="icon">
              <img src="./image/u252.png" alt="">
              </div>
            </div>
            <br>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="个人特长及兴趣爱好" @feedback="setIsShowType" :is-add="false">
          <div class="ability"  @click="toBasic('second')">
            <div class="content">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label">个人特长</div>
                  <div class="label-value">
                    {{ bsinfo.cDescrlong }}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">兴趣爱好</div>
                  <div class="label-value">
                    {{ bsinfo.rsHobby }}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
            <div class="icon">
              <img src="./image/u252.png" alt="">
            </div>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="家庭情况" @feedback="setIsShowType" where-is="family">
          <div class="ability" v-for="item in famVal">
            <div class="content" @click="toFamily(item)">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label">姓名</div>
                  <div class="label-value">
                    {{item.cName}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">性别</div>
                  <div class="label-value">
                    {{item.cFamilySexValue}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">关系</div>
                  <div class="label-value">
                    {{item.cRelationFamValue}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">工作单位</div>
                  <div class="label-value">
                    {{item.cCompany}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">职务</div>
                  <div class="label-value">
                    {{item.cPosition}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">联系电话</div>
                  <div class="label-value">
                    {{item.cPhone}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
            <div class="icon">
              <img src="./image/u252.png" alt="">
            </div>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="紧急情况联系人" @feedback="setIsShowType" :is-add="false">
          <div class="ability">
            <div class="content" @click="toEmergence()">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>姓名</div>
                  <div class="label-value">
                    {{tcpVal.cName}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>性别</div>
                  <div class="label-value">
                    {{tcpVal.cTactPerSexValue}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>与本人关系</div>
                  <div class="label-value">
                    {{tcpVal.cRelationTactValue}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">工作单位</div>
                  <div class="label-value">
                    {{tcpVal.cCompany}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">办公电话</div>
                  <div class="label-value">
                    {{tcpVal.cPhone2}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>手机电话</div>
                  <div class="label-value">
                    {{tcpVal.cPhone1}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">住宅电话</div>
                  <div class="label-value">
                    {{tcpVal.cPhone}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">联系地址</div>
                  <div class="label-value">
                    {{tcpVal.cAddress}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
            <!--<div class="icon">-->
            <!--<img src="./image/u252.png" alt="">-->
            <!--</div>-->
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="银行账号信息" @feedback="setIsShowType" :is-add="false">
          <div class="ability">
            <div class="content" @click="toBank()">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>开户银行名称</div>
                  <div class="label-value">
                    {{bankv}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">分/支行</div>
                  <div class="label-value">
                    {{bnkVal.rsBranchNm}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>银行账号</div>
                  <div class="label-value">
                    {{bnkVal.accountEcId}}
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账户名称</div>
                  <div class="label-value">
                    {{bnkVal.accountName}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
          </div>
        </folding>
      </div>

      <div class="matters">
        <folding title="社保公积金账户" @feedback="setIsShowType" :is-add="false">
          <div class="ability" v-for="(item,index) in sbgVal" @click="tosocail()">
            <div class="content" style="border-bottom:1px solid #ccc;margin-bottom:10px;">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账户类型</div>
                  <div class="label-value">
                    {{item.cDescr[0]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">未参加过</div>
                  <div class="label-value" v-if="item.cYesNo[0] == 'Y'">
                    是
                  </div>
                  <div class="label-value" v-else-if="item.cYesNo[0] == 'N'">
                    否
                  </div>
                  <div class="label-value" v-else="item.cYesNo[0] == ''">
                    
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账号</div>
                  <div class="label-value">
                    {{item.gpcnAcountNum[0]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>原缴纳地</div>
                  <div class="label-value">
                    {{item.cAddress[0]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>状态</div>
                  <div class="label-value">
                    {{item.cPhfStatusValue[0]}}
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div class="ability" v-for="(item,index) in sbgVal" @click="tosocail()">
            <div class="content" style="border-bottom:1px solid #ccc;margin-bottom:10px;">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账户类型</div>
                  <div class="label-value">
                    {{item.cDescr[1]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">未参加过</div>
                  <div class="label-value" v-if="item.cYesNo[1] == 'Y'">
                    是
                  </div>
                  <div class="label-value" v-else-if="item.cYesNo[1] == 'N'">
                    否
                  </div>
                  <div class="label-value" v-else="item.cYesNo[1] == ''">
                    
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账号</div>
                  <div class="label-value">
                    {{item.gpcnAcountNum[1]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>原缴纳地</div>
                  <div class="label-value">
                    {{item.cAddress[1]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>状态</div>
                  <div class="label-value">
                    {{item.cPhfStatusValue[1]}}
                  </div>
                </div>
              </div>
            </div>
          </div>

          <div class="ability" v-for="(item,index) in sbgVal" @click="tosocail()">
            <div class="content" style="border-bottom:1px solid #ccc;margin-bottom:10px;">
              <div class="line">
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账户类型</div>
                  <div class="label-value">
                    {{item.cDescr[2]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">未参加过</div>
                  <div class="label-value" v-if="item.cYesNo[2] == 'Y'">
                    是
                  </div>
                  <div class="label-value" v-else-if="item.cYesNo[2] == 'N'">
                    否
                  </div>
                  <div class="label-value" v-else="item.cYesNo[2] == ''">
                    
                  </div>
                  <div class="icon"></div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>账号</div>
                  <div class="label-value">
                    {{item.gpcnAcountNum[2]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>原缴纳地</div>
                  <div class="label-value">
                    {{item.cAddress[2]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label"><span class="important"></span>状态</div>
                  <div class="label-value">
                    {{item.cPhfStatusValue[2]}}
                  </div>
                </div>
                <div class="detailed-info-box">
                  <div class="label">本人档案所在地</div>
                  <div class="label-value">
                    {{ bsinfo.cArchiveAddr}}
                  </div>
                  <div class="icon"></div>
                </div>
              </div>
            </div>
          </div>

        </folding>
      </div>

      <div class="matters">
        <folding title="其他需要说明的情况" @feedback="setIsShowType" :is-add="false">
          <div class="otherexp" @click="toBasic('third')">
            <div class="regulations">
              <div class="title">
                是否有过犯罪记录？
              </div>
              <div class="answer" v-if="bsinfo.cYesNo1 == 'N'">
                无
              </div>
              <div class="answer" v-if="bsinfo.cYesNo1 == 'Y'">
                {{ bsinfo.cDescrlong1 }}
              </div>
            </div>
            <div class="regulations">
              <div class="title">
                曾否因大病入院或患有特殊疾病？
              </div>
              <div class="answer" v-if="bsinfo.cYesNo2 == 'N'">
                无
              </div>
              <div class="answer" v-if="bsinfo.cYesNo2 == 'Y'">
                {{ bsinfo.cDescrlong2 }}
              </div>
            </div>
            <div class="regulations">
              <div class="title">
                是否对其他公司负竞业限制义务？
              </div>
              <div class="answer" v-if="bsinfo.cYesNo3 == 'N'">
                无
              </div>
              <div class="answer" v-if="bsinfo.cYesNo3 == 'Y'">
                {{ bsinfo.cDescrlong3 }}
              </div>
            </div>
            <div class="regulations">
              <div class="title">
                是否曾在本集团任职或建立过劳动关系？
              </div>
              <div class="answer" v-if="bsinfo.cYesNo4 == 'N'">
                无
              </div>
              <div class="answer" v-if="bsinfo.cYesNo4 == 'Y'">
                {{ bsinfo.cDescrlong4 }}
              </div>
            </div>
            <div class="regulations">
              <div class="title">
                其他补充说明
              </div>
              <div class="answer">{{ bsinfo.cDescrlong5 }}</div>
            </div>
          </div>
        </folding>
      </div>
      <!-- <div class="sub-btn-content">
        <div class="sub-save">保存</div>
      </div> -->
    </div>
  </keep-alive>
</template>

<script>
  import Folding from './common/Folding'
  import {getQrmsg,getEdu,getDicItem,getExwork,getTrain,getLan,getPcAb,getjc,getFam,getTacp,getBnkacc,getzgzs,getsbg,getCountry,getNation,getBank} from '../../../api/api'
  import {json2Form} from '../../../util/http'

  export default {
    name: 'user-info',
    data() {
      return {
        bsinfo: '',
        foldingIndex: -1,
        isFirst: false,
        foldings:[],
        eduif: [],
        sexVal: [],
        expwVal: [],
        eduVal: [],
        degVal: [],
        traVal: [],
        lanVal: [],
        lanlvVal: [],
        lantpVal: [],
        pcVal: [],
        pclvVal: [],
        jcVal: [],
        jctpVal: [],
        famVal: [],
        tcpVal: [],
        bankv: '',
        bnkVal: [],
        zgzVal: [],
        sbgValf: [
          {
            cDescr:'社会保险',
            cYesNo:'',
            gpcnAcountNum:'',
            cAddress:'',
            cPhfStatusValue:''
          },
          {
            cDescr:'住房公积金',
            cYesNo:'',
            gpcnAcountNum:'',
            cAddress:'',
            cPhfStatusValue:''
          },
          {
            cDescr:'补充住房公积金',
            cYesNo:'',
            gpcnAcountNum:'',
            cAddress:'',
            cPhfStatusValue:''
          }
        ],
        sbgVal:[],
        empid: '',
        routerLink: ''
      }
    },
    components: {
      Folding
    },
    async mounted() {
      //alert(this.$route.params.archivesId);
      await this.$nextTick()
      this.foldings = this.$children.filter(value => value.hasOwnProperty('isShow'))
      this.setIsShowType();
      this.empid = this.$store.state.hid
      this.routerLink = 'InformationCollection'
    },
    methods: {
      getBsInfo() {
        let params = {rsHireId: this.empid}
        getQrmsg(params).then(res => {
          if (res && res.retCode === '000000') {
            this.bsinfo = res.retData
            //this.getcoulb(res.retData.country)
            //this.getnatlb(res.retData.ethnicGrpCd)
          } else {
            alert(res.retMsg);
          }
        })
      },
      setIsShowType(title) {
        this.whichCh(title)
        if (this.foldingIndex < 0) {
          if(this.isFirst){
            this.foldings[0].isShow = true
            this.isFirst = false
          }
        } else {
          this.foldings[this.foldingIndex].isShow = false
        }
        this.foldingIndex = this.foldings.findIndex(value => value.isShow)
      },
      //工作经历
      getExpwork() {
        let params = {rsHireId: this.empid}
        getExwork(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.expwVal.push(...res.retData)
            }else{
              this.expwVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //获取教育经历
      getEdus() {
        let params = {rsHireId: this.empid}
        getEdu(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.eduif.push(...res.retData)
            }else{
              this.eduif.push(res.retData)
            }
            console.log(res.retData)
          } else {
            alert(res.retMsg);
          }
        })
      },
      //培训经历
      getTras() {
        this.traVal = []
        let params = {rsHireId: this.empid}
        getTrain(params).then(res => {
          if (res && res.retCode === '000000') {   
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.traVal.push(...res.retData)
            }else{
              this.traVal.push(res.retData)
            }
            //console.log(this.traVal)
          } else {
            alert(res.retMsg);
          }
        })
      },
      //资格证书
      getzgzss() {
        this.zgzVal = []
        let params = {rsHireId: this.empid}
        getzgzs(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.zgzVal.push(...res.retData)
            }else{
              this.zgzVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //语言能力
      getLans() {
        this.lanVal = []
        let params = {rsHireId: this.empid}
        getLan(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.lanVal.push(...res.retData)
            }else{
              this.lanVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //计算机能力
      getPclvs() {
        let params = {rsHireId: this.empid}
        getPcAb(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.pcVal.push(...res.retData)
            }else{
              this.pcVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //奖惩情况
      getJxs() {
        let params = {rsHireId: this.empid}
        getjc(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.jcVal.push(...res.retData)
            }else{
              this.jcVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //家庭情况
      getFams() {
        let params = {rsHireId: this.empid}
        getFam(params).then(res => {
          if (res && res.retCode === '000000') {
            if(Object.prototype.toString.call(res.retData) === '[object Array]'){
              this.famVal.push(...res.retData)
            }else{
              this.famVal.push(res.retData)
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //紧急联系人
      getTacps() {
        let params = {rsHireId: this.empid}
        getTacp(params).then(res => {
          if (res && res.retCode === '000000') {
            this.tcpVal = res.retData
          } else {
            alert(res.retMsg);
          }
        })
      },
      //银行信息
      getBnkaccs() {
        let params = {rsHireId: this.empid}
        getBnkacc(params).then(res => {
          if (res && res.retCode === '000000') {
            this.bnkVal = res.retData
            this.getBanklb(res.retData.bankCd)
            if(res.retData == ''){
              this.$router.push({path:'/inputInformation/bank'})
            }
          } else {
            alert(res.retMsg);
          }
        })
      },
      //社保公积金
      getsbgj() {
        let params = {rsHireId: this.empid}
        getsbg(params).then(res => {
          if (res && res.retCode === '000000') {
            this.sbgVal.push(res.retData)
          } else {
            alert(res.retMsg);
          }
        })
      },

      // //国籍
      // getcoulb(cou) {
      //   getCountry().then(res => {
      //     res.retData.forEach((val) => {
      //       if(val.country == cou){
      //         this.bsinfo.country = val.descrshort
      //       }
      //     });
      //   })
      // },
      // //民族
      // getnatlb(nat) {
      //   getNation().then(res => {
      //     res.retData.forEach((val) => {
      //       if(val.ethnicGrpCd == nat){
      //         this.bsinfo.ethnicGrpCd = val.descrshort
      //       }
      //     });
      //   })
      // },
      //银行
      getBanklb(valbnk) {
        getBank().then(res => {
          res.retData.forEach((val) => {
            if(val.bankCd == valbnk){
              this.bankv = val.descrshort
            }
          });
        })
      },
      whichCh(val) {
        switch (val)
        {
          case '基本信息':
            if(this.bsinfo.length == 0){
              this.getBsInfo()
            }
          break;
          case '入公司前工作经历':
            if(this.expwVal.length == 0){
              this.getExpwork()
            }
          break;
          case '教育经历':
            if(this.eduif.length == 0){
              this.getEdus()
            }
          break;
          case '培训经历':
          if(this.traVal.length == 0){
            this.getTras()
          }
          break;
          case '资格证书':
          if(this.zgzVal.length == 0){
            this.getzgzss()
          }
          break;
          case '语言能力':
          if(this.lanVal.length == 0){
            this.getLans()
          }
          break;
          case '计算机能力':
          if(this.pcVal.length == 0){
            this.getPclvs()
          }
          break;
          case '奖惩情况':
          if(this.jcVal.length == 0){
            this.getJxs()
          }
          break;
          case '个人特长及兴趣爱好':
          if(this.bsinfo.length == 0){
            this.getBsInfo()
          }
          break;
          case '家庭情况':
          if(this.famVal.length == 0){
            this.getFams()
          }
          break;
          case '紧急情况联系人':
          if(this.tcpVal.length == 0){
            this.getTacps()
          }
          break;
          case '银行账号信息':
          if(this.bnkVal.length == 0){
            this.getBnkaccs()
          }
          break;
          case '社保公积金账户':
          if(this.sbgVal.length == 0){
            this.getsbgj()
          }
          if(this.bsinfo.length == 0){
            this.getBsInfo()
          }
          break;
          case '其他需要说明的情况':
          if(this.bsinfo.length == 0){
            this.getBsInfo()
          }
          break;
        }
      },
      //跳转基本信息
      toBasic(whch) {
        this.$router.push({  
          name:'basicIpt',  
          params:{  
            bsifs: this.bsinfo,
            whc: whch
          }  
        }) 
      },
      //工作经历
      toWorkExp(item) {
        this.$router.push({
          name:'theCompanyBefore',  
          params:{ 
            workexp: item
          } 
        })
      },
      //教育经历
      toEdu(item){
        this.$router.push({
          name:'education',  
          params:{ 
            edult: item
          } 
        })
      },
      //培训经历
      totrain(item) {
        this.$router.push({
          name:'training',  
          params:{ 
            tralt: item
          } 
        })
      },
      //资格证书
      toquality(item) {
        this.$router.push({
          name:'qualification',  
          params:{ 
            qualt: item
          } 
        })
      },
      //语言能力
      toLang(item) {
        this.$router.push({
          name:'language',  
          params:{ 
            lang: item
          }
        })
      },
      //跳转计算机
      toComputer(item) {
        this.$router.push({
          name:'computer',  
          params:{ 
            coup: item
          } 
        })
      },
      //奖惩
      toReward(item) {
        this.$router.push({
          name:'rewardsAndPunishments',  
          params:{ 
            rewd: item
          } 
        })
      },
      //家庭
      toFamily(item) {
        this.$router.push({
          name:'family',  
          params:{ 
            fam: item
          } 
        })
      },
      //紧急联系
      toEmergence() {
        this.$router.push({
          name:'emergent',  
          params:{ 
            emeg: this.tcpVal
          } 
        })
      },
      toBank(){
        this.$router.push({
          name:'bank',  
          params:{ 
            banklt: this.bnkVal
          } 
        })
      },
      tosocail(item){
        this.$router.push({
          name:'socsec',  
          params:{ 
            socvl: this.sbgVal,
          } 
        })
      },
      //判断是否数组
      ObjToArr(val,arr) {
        arr = []
        if(Object.prototype.toString.call(val) ==='[object Array]'){
          arr.push(...val)
        }else{
          arr.push(val)
        }
      }
    },
    // filters: {
    //   findLanLv(lanlv,lanlvArr=[]) {
    //     if (lanlv && lanlvArr.length > 0) {
    //       return lanlvArr.find(val => val.value === lanlv) ? lanlvArr.find(val => val.value === lanlv)['name'] : ''
    //     }
    //     return ''
    //   }
    // }
  }
</script>

<style type="text/scss" lang="scss" scoped>
  @import "./style";
</style>
